home *** CD-ROM | disk | FTP | other *** search
/ Aminet 34 / Aminet 34 (2000)(Schatztruhe)[!][Dec 1999].iso / Aminet / util / misc / cycledbase.lha / CycleDBase / AdvSearch / AdvSearch.c next >
Encoding:
C/C++ Source or Header  |  1999-09-27  |  1.9 KB  |  76 lines

  1. /*  Purpose:    Program searches cycledbase file and returns all
  2.     matches in order of discovery
  3.     Author:     Donald W Millican
  4.     Start Date : 21/09/99
  5.     Finish Date: --/--/--
  6.     Section:    Future
  7.     Program:   CycleDBase Advanced Search program
  8. */
  9.  
  10. /*
  11. *** Pre-Program History ***
  12. 21/09/99 : Version 0.1 : Main Window created and basic GUI structures ready
  13. 22/09/99 : Version 0.2 : Display Load requester
  14. 22/09/99 : Version 0.3 : Display file when loaded
  15. 23/09/99 : Version 0.4 : Menus now work
  16. 24/09/99 : Version 0.5 : Implement search code
  17. 25/09/99 : Version 0.6 : Print search results to the screen
  18. 26/09/99 : Version 0.7 : Results window displayed
  19. 26/09/99 : Version 0.8 : Results appear in window
  20. 26/09/99 : Version 0.9 : Bugfix and tidy up code
  21.  
  22. *** Program History
  23. 26/09/99 : Version 1.0 : Initial Release
  24. */
  25.  
  26. #include <exec/types.h>
  27. #include <clib/dos_protos.h>
  28. #include <clib/exec_protos.h>
  29. #include <clib/gadtools_protos.h>
  30. #include <clib/graphics_protos.h>
  31. #include <clib/intuition_protos.h>
  32. #include <graphics/gfxmacros.h>
  33. #include <graphics/GfxBase.h>
  34. #include <intuition/intuition.h>
  35. #include <intuition/IntuitionBase.h>
  36. #include <libraries/gadtools.h>
  37. #include <string.h>
  38. #include <stdlib.h>
  39. #include <stdio.h>
  40.  
  41. #include "Search.c"
  42.  
  43. /*
  44. ** Open all libraries and run.  Clean up when finished or on error..
  45. */
  46. void main()
  47. {
  48. if (NULL == (IntuitionBase = OpenLibrary("intuition.library", 37)))
  49.     {
  50.         EasyRequest(NULL, &nointuition, NULL);
  51.     }
  52. else
  53.     {
  54.     if (NULL == (GfxBase = OpenLibrary("graphics.library", 37)))
  55.         {
  56.             EasyRequest(NULL, &nographics, NULL);
  57.         }
  58.     else
  59.         {
  60.         if (NULL == (GadToolsBase = OpenLibrary("gadtools.library", 37)))
  61.             {
  62.                 EasyRequest(NULL, &nogadtools, NULL);
  63.             }
  64.         else
  65.             {
  66.             searchwindow();
  67.  
  68.             CloseLibrary(GadToolsBase);
  69.             }
  70.         CloseLibrary(GfxBase);
  71.         }
  72.     CloseLibrary(IntuitionBase);
  73.     }
  74. }
  75.  
  76.